package main

import "fmt"

func main() {
	var a aaa
	typeSwitch(a)
	/*	v,ko:=a.(string)
		fmt.Println(v,ko)*/
}

type aaa int

func typeSwitch(tst interface{}) { //断言的类型必须是interface{才行}
	switch v := tst.(type) {
	case aaa:
		fmt.Println("Stringer:", v)
	default:
		fmt.Println("Unknown")
	}
}
